<include file="Layout/header" title="编辑类别" />
<include file="Layout/sidebar" />
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            类别管理
            <small>编辑类别</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> 类别管理</a></li>
            <li class="active">编辑类别</li>
        </ol>
    </section>

    <!-- Main content -->
    <section class="content">
        <script src="__PLUGIN__/bootstrapvalidator/js/bootstrapValidator.min.js"></script>
        <link rel="stylesheet" href="__PLUGIN__/bootstrapvalidator/css/bootstrapValidator.min.css">
        <!-- Horizontal Form -->
        <div class="box box-info" style="width:90%;margin: 0 auto;">
            <div class="box-header with-border">
                <h3 class="box-title">类别参数</h3>
            </div>
            <!-- /.box-header -->
            <!-- form start -->
            <form class="form-horizontal" action="" method="post">
                <div class="box-body">
                    <div class="form-group">
                        <label for="inputName" class="col-sm-2 control-label">类别名称</label>

                        <div class="col-sm-10">
                            <input type="hidden" name="id" value="{$data.id}" />
                            <input type="text" class="form-control" id="inputName" name="name" value="{$data.name}" placeholder="类别名称">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="inputFolder" class="col-sm-2 control-label">文件夹名</label>

                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="inputFolder" name="folder" value="{$data.folder}" placeholder="文件夹名">
                        </div>
                    </div>
                </div>
                <!-- /.box-body -->
                <div class="box-footer">
                    <button type="reset" class="btn btn-default">重置</button>
                    <button type="submit" class="btn btn-info pull-right">提交</button>
                </div>
                <!-- /.box-footer -->
            </form>
        </div>
    </section>
    <!-- /.content -->
</div>
<!-- /.content-wrapper -->
<script type="text/javascript">
    //jQuery代码
    $(function () {
        $('form').bootstrapValidator({
            message: 'This value is not valid',
            feedbackIcons: {
                valid: 'glyphicon glyphicon-ok',
                invalid: 'glyphicon glyphicon-remove',
                validating: 'glyphicon glyphicon-refresh'
            },
            fields: {
                name: {
                    message: '用户名验证失败',
                    validators: {
                        notEmpty: {
                            message: '类别名称不能为空'
                        }
                    }
                },
                folder: {
                    validators: {
                        notEmpty: {
                            message: '文件夹名不能为空'
                        }
                    }
                }
            }
        });
    });
</script>
<include file="Layout/footer" />